const UserService = require('../service/user')

class UserController {
  async login(ctx) {
    let data = await UserService.login(ctx);
    ctx.body = data;
  }

  async register(ctx) {
    let data = await UserService.register(ctx);
    ctx.body = data;
  }

  async delete(ctx) {
    let data = await UserService.delete(ctx);
    ctx.body = data;
  }
  async page(ctx) {
    let data = await UserService.page(ctx);
    ctx.body = data;
  }

  async search(ctx) {
    let data = await UserService.search(ctx);
    ctx.body = data;
  }

}

module.exports = new UserController